<template>
  <van-nav-bar left-text="爱课" right-text="按钮">
    <template #right>
      <img src="../assets/image/indexbar.png" alt="" />
    </template>
  </van-nav-bar>

  <router-view v-slot="{ Component }">
    <keep-alive>
      <component
        :is="Component"
        v-if="$route.meta.keepAlive"
        :key="$route.path"
      />
    </keep-alive>
    <component
      :is="Component"
      v-if="!$route.meta.keepAlive"
      :key="$route.path"
    />
  </router-view>
  <Footer></Footer>
</template>

<script>
import Footer from "../components/public/Footer.vue";
export default {
  components: {
    Footer,
  },
};
</script>

<style lang="less" scoped>
/deep/.van-nav-bar__text {
  color: black;
  font-size: 16.5px;
  font-weight: 600;
}
.van-nav-bar__right img {
  width: 24px;
  height: 19.5px;
}
</style>
